package com.class04.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.w3c.dom.ls.LSInput;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassDescription:
 * @JdkVersion: 17
 * @Author: yxy
 * @Created: 2023/12/26 14:44
 */
@RestController
@RequestMapping("hello")
public class HelloController {
    @Value("${class04.username}")
    public String username;
    @Value("${class04.password}")
    public String password;
    @Value("${class04.xianyanbao}")
    public String hahaha;


    //    @GetMapping("boot")
    @RequestMapping(value = "boot", method = RequestMethod.GET)
    public String hello() {
        return "hello springboot3";
    }

    @GetMapping("user")
    public List<String> getUser() {
        List<String> list = new ArrayList<>();
        list.add(username);
        list.add(password);
        list.add(hahaha);
        return list;

    }


}
